package com.bustle.product.dto.provider;

import javax.ejb.EJB;
import javax.ejb.Stateless;

import com.bustle.commons.MapConverter;
import com.bustle.commons.data.dao.Dao;
import com.bustle.commons.data.dto.DtoDao;
import com.bustle.product.data.Provider;
import com.bustle.product.data.dao.ProviderDao;

public interface ProviderDtoDao extends Dao<Integer, ProviderDto>
{
  @Stateless
  public class DefaultProviderDtoDao extends DtoDao<Integer, ProviderDto, Provider> implements ProviderDtoDao
  {
    @Override
    protected Dao<Integer, Provider> getDao()
    {
      return providerDao;
    }

    @Override
    protected MapConverter<ProviderDto, Provider> getDtoToDataMapConverter()
    {
      return dtoToProviderConverter;
    }

    @Override
    protected MapConverter<Provider, ProviderDto> getDataToDtoMapConverter()
    {
      return providerToDtoConverter;
    }

    @EJB
    protected ProviderDao providerDao;
    @EJB
    protected DtoToProviderMapConverter dtoToProviderConverter;
    @EJB
    protected ProviderToDtoMapConverter providerToDtoConverter;
  }

}
